<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" id="html">
    <head>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <base href="<?= base_url(1); ?>" />
        <link type="text/css" href="css/main.css?v=<?= $config['version'] ?>" rel="stylesheet" />
        
		<script type="text/javascript">
		
			function checkBlackInfo()
			{
				var kind = document.getElementById("kind").value;
				var data = document.getElementById("data").value;
				//alert(kind.value);
				//alert(data.value);
				//ip
				if(1 == kind)
				{
					return true;
					//preg="/\A((([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\.){3}(([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\Z/";
					preg ="/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/";
					if(data.match(preg))
					{
						return true;
					}else
					{
						alert('ip error,please input again');
						return false;
					}
				}
			}

			function checkValid()
			{
				
			}
		</script>    
    
    </head>
    <body>
        <?php include(VIEWPATH . 'common/main_header.php'); ?>
        <form action="" method="POST" id="rowForm">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" class="tablegrid tableedit">
                <tr><td><?= translate('SEAL_TIME') ?>:</td><td>
                        <select name="row[timelength]" id="timelength">
                            <?php foreach ($timelist as $key=>$value) { ?>
                                <option value="<?=$key ?>"><?=$value['areaname'] ?></option>
                            <?php } ?>
                        </select></td></tr>
                <tr><td><?= translate('SEAL_BLACKLIST_KIND') ?>:</td>
                	<td>
	                <select name="row[kind]" id="kind">
	                  	<?php foreach ($kindlist as $key=>$value) { ?>
	                    <option value="<?=$key ?>"><?=$value ?></option>
	                    <?php } ?>
	                </select>
	                </td>
                </tr>
<!--                <tr><td>--><?//= translate('SEAL_BLACKLIST_DATA') ?><!--:</td>-->
<!--                	<td><input type="text" name="row[data]" id="data" size="50" onBlur=""/></td></tr>-->
                <tr><td><?= translate('SEAL_BLACKLIST_REASON') ?>:</td><td><input type="text" name="row[reason]" id="reason" size="50" /></td></tr>

                <tr><td></td><td><input type="submit" value="<?= translate('RESET') ?>" id="submit"/>
<!--                <input type="reset" value="--><?//= translate('RESET') ?><!--" id="reset"/></td></tr>-->
            </table>
        </form>
        <script type="text/javascript">
            SG.init("core.form", function() {
                $.formValidator.initConfig({formid: "#rowForm", submitonce: true});
                $("#rolename").formValidator({empty: false, onshow: '<?= translate('PLASE_INPUT_ROLE_NAME') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});     
                $("#sealtime").formValidator({empty: false, onshow: '<?= translate('AREA_FORM_INPUT_OPENTIME') ?>'}).inputValidator({min: 1, onerrormin: '<?= translate('C_NOT_EMPTY') ?>'});
            });
        </script>
    </body>
</html>
